from books import Books
from engine import connect
from session import session
def deleteid(session,id): #根据编号删除数据
    session.query(Books).filter_by(编号=id).delete()
    print("删除的编号为"+id+"图书信息成功！")
if __name__ == "__main__":
    conn = connect() #获取数据库连接
    session = session(conn) #获取session
    #查询记录
    deleteid(session,input("请输入要查询的记录编号："))
    session.commit() #提交事务
    session.close()